package com.xinqi.modules.file.controller;

import com.xinqi.common.base.response.R;
import com.xinqi.common.third.oss.slice.event.OssSliceEvent;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/file/service")
@RequiredArgsConstructor
public class TestController {

    private final OssSliceEvent ossSliceEvent;

    @GetMapping("/test")
    public R<String> test() {
        ossSliceEvent.createSliceImage("2023-08-31/1693448247945345-【1.6】新奇课堂.pptx", 1231231231231231L, "homework-slice");
        return R.ok("切片成功");
    }

    @GetMapping("/testlist")
    public R<List<String>> testList() {
        ossSliceEvent.getSliceImage("2023-08-31/aaaaaaaaaaaaaa/b5d333eadab84617b1290483fb70ed42/","pptx");
        return R.ok("切片成功");
    }

}
